const koaRouter = require('@koa/router')
const { create, remove, update, get, getList } = require('../controller/dictionaryController.js')
const { verifAuth } = require('../middleware/login.middleware.js')

const dictionaryRouter = new koaRouter({ prefix: '/dictionary' })
// 增加
dictionaryRouter.post('/', verifAuth, create)
// // 查
dictionaryRouter.get('/:id', get)
dictionaryRouter.get('/', getList)
// // 改
dictionaryRouter.post('/:id', verifAuth, update)
// // 删
dictionaryRouter.delete('/:id', verifAuth, remove)
module.exports = dictionaryRouter
